@space-left: 14px;
@space-right: 14px;
@space-bottom: 16px;
@space-top: 10px;

@backgroundColor: #DDE2EB;


.table() {
  border-collapse: separate;
  border-spacing: 0 10px;
  padding-left: @space-left;
  padding-right: @space-right;
}

.tableWrapper() {
  position: relative;
  background-color: @backgroundColor;
}

.thead() {
  background-color: @backgroundColor;
  color: #4F555F;
  font-size: 14px;
}

.tdhover() {
  transform: scale(1.01,1.01);
  box-shadow: #ccc 0 0 10px;
  // background: #fff;
}

.backgroundWhite() {
  background: #fff;
}

.paragLeft() {
  float: left;
  margin: @space-bottom 0 @space-bottom @space-left;
}

:host ::ng-deep table {
  .table() !important;
}

/* 整个表格的背景色 */
:host ::ng-deep .ant-table-wrapper,
:host ::ng-deep .ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body {
  .tableWrapper() !important;
}

:host ::ng-deep thead tr th {
  .thead() !important;
}

:host ::ng-deep .ant-table-tbody {
  border-collapse: separate;
  border-spacing: 0 10px;
  .backgroundWhite() !important;
}

:host ::ng-deep tr {
  background-color: #fff;
}

/* hover 背景颜色 */
:host ::ng-deep .ant-table-tbody > tr:hover {
  // .tdhover() !important;
}

:host ::ng-deep .ant-table-tbody > tr:hover > td.ant-table-td-left-sticky  {
  .backgroundWhite() !important;
}

:host ::ng-deep .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td {
  .backgroundWhite() !important;
}

:host ::ng-deep .ant-table td {
  padding: 0;
  height: 44px;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-family: PingFang-Bold;
  font-size: 13px !important;
  color: #585c60;
  text-align: center;
  box-sizing: border-box;
}

:host ::ng-deep th {
  padding: 10px 0px 0px 0px !important;
}
:host ::ng-deep tr:nth-child(6n-5) > td:not(.ew-tail):first-child {
  border-left: 8px solid #F04E67;
}
:host ::ng-deep tr:nth-child(6n-4) > td:not(.ew-tail):first-child {
  border-left: 8px solid #FF7046;
}
:host ::ng-deep tr:nth-child(6n-3) > td:not(.ew-tail):first-child {
  border-left: 8px solid #FEBE2F;
}
:host ::ng-deep tr:nth-child(6n-2) > td:not(.ew-tail):first-child {
  border-left: 8px solid #6DC1FF;
}
:host ::ng-deep tr:nth-child(6n-1) > td:not(.ew-tail):first-child {
  border-left: 8px solid #03E1BE;
}
:host ::ng-deep tr:nth-child(6n) > td:not(.ew-tail):first-child {
  border-left: 8px solid #4A7BF7;
}

:host ::ng-deep tr > td:first-child {
  border-left: 8px solid red;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}
:host ::ng-deep tr > td:nth-last-child(-n + 1) {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
  padding: 0 !important;
}

:host ::ng-deep .ant-table-thead > tr > th {
  border-bottom: 0 !important;
}

/* 底部跳转页码位置 */
:host ::ng-deep .ant-pagination.ant-table-pagination {
  .paragLeft() !important;
}

.cil-table-block {
  position: relative;

  .cil-custom-btns {
    position: absolute;
    right: @space-right;
    bottom: @space-bottom;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cil-custom-btns-empty-data {
    display: flex;
    justify-content: flex-end;
    margin-top: @space-top;
  }
}

/* 操作 icon 的大小 */
:host ::ng-deep td i.anticon.ng-star-inserted {
  font-size: 22px;
}
:host ::ng-deep .cil_edit_rule .cil-tbody.ant-table-tbody > tr:hover > td.ant-table-td-left-sticky {
  background: rgba(245, 247, 250, 1) !important;
}

:host ::ng-deep .cil_edit_rule .cil-tbody.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td {
  background: rgba(245, 247, 250, 1) !important;
}

:host ::ng-deep .special_checkbox label.ant-checkbox-wrapper  .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner::after {
  top: 38%;
  display: block !important;
  height: 13px;
  
}

:host ::ng-deep .special_th_checkbox label.ant-checkbox-wrapper  .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner::after {
  top: 24%;
  left: 16%;
  width: 8.714286px !important;
  height: 8.142857px !important;
}

:host ::ng-deep .special_th_checkbox label.ant-checkbox-wrapper  .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner::after {
  display: block !important;
}
